package com.world.business.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.world.business.user.domain.UserEquipment;
import com.world.business.user.domain.query.UserEquipmentLossRequest;
import com.world.business.user.domain.query.UserEquipmentPageRequest;
import com.world.business.user.domain.vo.UserEquipmentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户装备 Mapper 接口
 * </p>
 *
 * @author 邓驴
 * @since 2023-07-27
 */
@Mapper
public interface UserEquipmentMapper extends BaseMapper<UserEquipment> {

    /**
     * 分页
     *
     * @param page    分页参数
     * @param request 请求参数
     * @return {@link IPage < UserEquipmentPageVO >}
     * @author WangYX
     * @date 2023/09/05 11:20
     */
    IPage<UserEquipmentVO> getPage(IPage<UserEquipment> page, @Param("request") UserEquipmentPageRequest request);

    /**
     * 装备损耗
     *
     * @param request 请求参数
     * @author WangYX
     * @date 2023/09/06 9:36
     */
    void equipmentLoss(UserEquipmentLossRequest request);

    /**
     * 用户装备详情
     *
     * @param userId 用户Id
     * @return {@link List <UserEquipmentVO>}
     * @author WangYX
     * @date 2023/09/06 10:26
     */
    List<UserEquipmentVO> get(Long userId);

}
